# Filters added to this controller will be run for all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
  layout "maturin"
  before_filter :check_authentication, :except => ["signin", "create_captain"]
  
  def check_authentication 
    unless session[:user] 
      session[:intended_action] = action_name 
      session[:intended_controller] = controller_name 
      redirect_to :controller => "user", :action => "signin" 
    end 
  end 
end